package Optimistic;

import java.util.concurrent.atomic.AtomicInteger;

public class OptimisticOperate {

    private AtomicInteger count = new AtomicInteger();
    //private long count = 0;
    public void take(){
        for (int i = 0; i < 100; i++) {
            System.out.println(count.addAndGet(1));
        }
    }
}
